﻿using GalaSoft.MvvmLight;
using System.Windows;

namespace Glorysoft.EAP.EAPClient.Model
{
    public class ScanModel : ViewModelBase
    {
        private string username;
        public string Username
        {
            get
            {
                return username;
            }

            set
            {
                username = value;
                RaisePropertyChanged("Username");
            }
        }
        private string password;
        public string Password
        {
            get
            {
                return password;
            }

            set
            {
                password = value;
                RaisePropertyChanged("Password");
            }
        }
        private string passwordValue;
        public string PasswordValue
        {
            get
            {
                return passwordValue;
            }

            set
            {
                passwordValue = value;
                RaisePropertyChanged("PasswordValue");
            }
        }
        private string eqpId;
        public string EqpId
        {
            get
            {
                return eqpId;
            }

            set
            {
                eqpId = value;
                RaisePropertyChanged("EqpId");
            }
        }
        private string portid;
        public string Portid
        {
            get
            {
                return portid;
            }

            set
            {
                portid = value;
                RaisePropertyChanged("Portid");
            }
        }
        private string lotid;
        public string Lotid
        {
            get
            {
                return lotid;
            }

            set
            {
                lotid = value;
                RaisePropertyChanged("Lotid");
            }
        }
        private string carrierID;
        public string CarrierID
        {
            get
            {
                return carrierID;
            }

            set
            {
                carrierID = value;
                RaisePropertyChanged("CarrierID");
            }
        }
        private string scanStatus = "waiting";
        public string ScanStatus
        {
            get
            {
                return scanStatus;
            }

            set
            {
                scanStatus = value;
                if (scanStatus == "error")
                    ScanColor = "red";
                RaisePropertyChanged("ScanStatus");
            }
        }
        private string scanColor = "#f8f9fb";
        public string ScanColor
        {
            get
            {
                return scanColor;
            }

            set
            {
                scanColor = value;
                RaisePropertyChanged("ScanColor");
            }
        }
        private Visibility _ClearBtnVis = Visibility.Collapsed;
        public Visibility ClearBtnVis
        {
            get
            {
                return _ClearBtnVis;
            }

            set
            {
                _ClearBtnVis = value;
                RaisePropertyChanged("ClearBtnVis");
            }
        }
    }
}
